package day0108HomeWork;

public class Rectangle {
	private int wide;
	private int length;
	
	public void zhouchang() {
		System.out.println("周长为" + ((wide + length) * 2));
	}
	
	public void mianji() {
		System.out.println("面积为" + (wide * length));
	}
	
	
	public Rectangle() {
		this.length = 1;
		this.wide = 1;
	}

	public Rectangle(int wide, int length) {
		super();
		this.wide = wide;
		this.length = length;
	}
	public Rectangle(int same) {
		super();
		this.length = same;
		this.wide = same;
	}

	public int getWide() {
		return wide;
	}


	public void setWide(int wide) {
		this.wide = wide;
	}


	public int getLength() {
		return length;
	}


	public void setLength(int length) {
		this.length = length;
	}


	@Override
	public String toString() {
		return "Rectangle [wide=" + wide + ", length=" + length + "]";
	}
}
